package net.omnivention.wulumuqi;

import net.omnivention.wulumuqi.html.HtmlElementFactory;

import org.jdom.DefaultJDOMFactory;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.Namespace;

public class WuluJDOMFactory extends DefaultJDOMFactory {

	public Document document(Element rootElement) {
		return new HtmlDocument(rootElement);
	}

	public Element element(String name, Namespace ns) {
		Element tag = HtmlElementFactory.createElement(name, ns);
		if (tag == null) {
			tag = super.element(name, ns);
		}

		return tag;
	}

}
